package com.json;


import com.alibaba.fastjson.JSON;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class test {

    @Test
    public void  testFastJson2(){
        String json = "[2022,2023,2024";
        List<Integer> list = new ArrayList<>();
        try {
            list = JSON.parseArray(json, Integer.class);
        } catch (Exception e) {
            System.out.println("异常现象" + json + e);
            e.printStackTrace();
        }
        System.out.println(list);
    }
}
